-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set wildcard classpath for windows start batch #382
Conversation
The generated start script for Windows consists of a huge classpath. This classpath was too long, resulting in an error when executing the start script. Using wildcard to include libraries shortens the classpath so that now error occurs when executing the start script.
@blackwinter had worked quite a bit on gradle scripts , so you may want to have look here? |
tested on Windows, it works. (The generated runner.bat as standalone runner is in the folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a simpler solution that also maintains consistency between Windows and Unix (even though the latter doesn't necessarily require this change, it's preferable that both behave in the same way).
Co-authored-by: Jens Wille <[email protected]>
@maipet just to be on the save side - could you test on Windows the new commit by @blackwinter ? |
@dr0i with the last changes I got an error message while executing the gradlew distZip
The folder |
@blackwinter something is wrong , presumably with be72f98 . Can you have a look? |
Works for me on Linux. No idea why Windows behaves differently. @maipet: Can you try the following? diff --git metafix-runner/build.gradle metafix-runner/build.gradle
index 94b6337..1ef54e9 100644
--- metafix-runner/build.gradle
+++ metafix-runner/build.gradle
@@ -52,5 +52,6 @@ application {
startScripts {
// See https://github.com/metafacture/metafacture-fix/issues/371
classpath = files('*')
+ doNotTrackState("")
}
} |
Thx! Now it works, with added doNotTrackState the error has been fixed. |
Gradle would produce the following error on Windows (while Linux is not affected): "Cannot access input property 'classpath' of task ':metafix-runner:startScripts'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.10.2/userguide/incremental_build.html#sec:disable-state-tracking in the Gradle documentation."
Fixed in a2fbff1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Great - a big thx to all who have contributed here to fix this issue! |
The generated start script for Windows consists of a huge classpath. This classpath was too long, resulting in an error when executing the start script. Using wildcard to include libraries shortens the classpath so that now error occurs when executing the start script.
To test this:
then look in
./metafix-runner/build/scripts/metafix-runner.bat
and execute that on windows @maipet.[edit:] That would not work resp. is not explained precisely enough. Step-by-step:
unzip metafix-runner/build/distributions/$distributionVersion.zip
( This will unpack to a folder named$distributionVersion
.)To run the start scripts execute the script residing in
./$distributionVersion/bin/
, depending on your OS (Windows:metafix-runner.bat
or *NIX like:metafix-runner
). Note that$distributionVersion
is a variable and should be substituted by you with e.g.metafix-runner-1.1.3-SNAPSHOT
.)Resolves #371.